package pkg

import "regexp"

func Tel(s string) (bool, string) {
	if s == "" {
		return false, "手机号不能为空"
	}
	re := regexp.MustCompile("^1[3-9][0-9]{9}$")
	return re.MatchString(s), ""
}

func Password(s string) (bool, string) {
	if s == "" {
		return false, "密码不能为空"
	}
	re := regexp.MustCompile("^[a-zA-z][a-zA-Z0-9]{5,11}$")
	return re.MatchString(s), ""
}
